enum ContentType { 
  knowledge, 
  question,
  poem,
  math,
}

class LearningItem {
  final String id;
  final String title;
  final String content;
  final ContentType type;
  final int grade; // 年级 (1-12)
  final String subject; // 学科
  final String module; // 知识模块
  final String? imageUrl;
  final String? videoUrl;
  final Map<String, dynamic>? questionData;
  final int difficulty;
  final List<String> tags;
  final String? contentRef;
  final String? author;
  final String? dynasty;
  final String? translation;
  final String? formula;
  final String? description;
  final String? example;

  LearningItem({
    required this.id,
    required this.title,
    required this.content,
    required this.type,
    this.grade = 1, // 默认为1年级
    required this.subject,
    required this.module,
    this.imageUrl,
    this.videoUrl,
    this.questionData,
    this.difficulty = 1,
    this.tags = const [],
    this.contentRef,
    this.author,
    this.dynasty,
    this.translation,
    this.formula,
    this.description,
    this.example,
  });
}